Skip to content

[Multi_K8s-Plugin] Implement plan preview#6685

Open
mohammedfirdouss wants to merge 10 commits intopipe-cd:masterfrom
mohammedfirdouss:feat/plan-preview
Open

[Multi_K8s-Plugin] Implement plan preview#6685
mohammedfirdouss wants to merge 10 commits intopipe-cd:masterfrom
mohammedfirdouss:feat/plan-preview

Conversation

@mohammedfirdouss
Copy link
Copy Markdown
Contributor

@mohammedfirdouss mohammedfirdouss commented Apr 17, 2026

What this PR does:
Implements Plan Preview for the kubernetes_multicluster plugin,the missing feature listed in the plugin's issue.

Plan Preview shows users a diff of what will change (added / changed / deleted manifests) before a deployment actually runs. Before this change, the PipeCD UI showed an empty preview panel for all multicluster applications. This PR ports the feature from the single-cluster kubernetes plugin and extends it to support per-cluster manifest paths via multiTargets.

Why we need it:
Without Plan Preview, users deploying to multiple clusters had no visibility into what resources would be affected before approving a deployment.

Which issue(s) this PR fixes:

Fixes #6446

Does this PR introduce a user-facing change?:

  • How are users affected by this change: The PipeCD UI now shows a manifest diff panel before multicluster deployments start. For apps using multiTargets, one diff panel is shown per deploy target. Secret values are masked in the diff output.
  • Is this breaking change: No
  • How to migrate (if breaking change): N/A
Screenshot Capture - 2026-04-27 - 09-10-34 Screenshot Capture - 2026-04-27 - 09-10-41

Viewing plan preview results:

Use pipe-cd/actions-plan-preview to automatically post plan preview diffs as GitHub PR comments when a pull request is opened or updated.

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
@mohammedfirdouss
Copy link
Copy Markdown
Contributor Author

mohammedfirdouss commented Apr 20, 2026

CLI test (pipectl): Confirmed working. Running pipectl plan-preview against a test branch with an image bump (v0.38.0 → v0.39.0) returned the correct manifest diff with added/changed/deleted counts. Secret values were masked.

GitHub Actions test: The pipe-cd/actions-plan-preview action runs without errors and posts a comment on every PR. The piped receives and handles the plan-preview command successfully.

Latest test PR: mohammedfirdouss/pipecd-test-app#6

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.94%. Comparing base (a3fa0e0) to head (5be2869).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6685      +/-   ##
==========================================
- Coverage   29.48%   28.94%   -0.55%     
==========================================
  Files         593       34     -559     
  Lines       63440     3092   -60348     
==========================================
- Hits        18706      895   -17811     
+ Misses      43289     2140   -41149     
+ Partials     1445       57    -1388     
Flag Coverage Δ
. ?
.-pkg-app-pipedv1-plugin-analysis ?
.-pkg-app-pipedv1-plugin-ecs 31.82% <ø> (ø)
.-pkg-app-pipedv1-plugin-kubernetes ?
.-pkg-app-pipedv1-plugin-kubernetes_multicluster ?
.-pkg-app-pipedv1-plugin-scriptrun 54.83% <ø> (ø)
.-pkg-app-pipedv1-plugin-terraform ?
.-pkg-app-pipedv1-plugin-wait ?
.-pkg-app-pipedv1-plugin-waitapproval ?
.-pkg-plugin-sdk ?
.-tool-actions-gh-release 19.23% <ø> (ø)
.-tool-actions-plan-preview ?
.-tool-codegen-protoc-gen-auth 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
@mohammedfirdouss mohammedfirdouss force-pushed the feat/plan-preview branch 4 times, most recently from 4d6dcee to 54f64d4 Compare April 25, 2026 21:11
Add plugin_test.go and testdata covering single-target and multi-target scenarios.

Signed-off-by: Mohammed Firdous <124298708+mohammedfirdouss@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[LFX Mentorship T-1 2026] Kubernetes Multi-Cluster Plugin #6446

1 participant